import { Behaviour } from "./engine/Behaviour";
import { Transform } from "./engine/Transform";
import { RigidBody } from "./RigidBody";

export class Follow extends Behaviour {

    onUpdate() {
        const mainRole = this.engine.getGameObject('player')
        this.gameObject.getBehaviour(Transform).x = mainRole.getBehaviour(Transform).x - mainRole.getBehaviour(RigidBody).x * 50
    }
}